﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hartley.BusinessLogic;
using Hartley.DTOs;
using Hartley.Entities;

namespace Hartley.ApplicationLogic
{
   public class SportsAL
    {
        HcFacade hcFacade = new HcFacade();

        public void saveTeam(TeamDTO teamDTO)
        {
            hcFacade.saveTeam(teamDTO);
        }

        public void saveTeamMember(TeamMemberDTO teamMemberDTO)
        {
            hcFacade.saveTeamMember(teamMemberDTO);
        }


        public string saveMatch(MatchDTO matchDTO)
        {
            try
            {
                return hcFacade.saveMatch(matchDTO);
            }
            catch
            {
                throw;
            }
        }



        public List<StudentDTO> GetStudents()
        {
            return hcFacade.GetStudents();

        }


        public List<TeamDTO> GetAllTeams()
        {
            return hcFacade.GetAllTeams();

        }

        public List<TeamDTO> GetTeamById(Guid teamId)
        {
            return hcFacade.GetTeamById(teamId);

        }

        public List<TeamMemberDTO> GetTeamMemberByTeamId(Guid teamId)
        {
            return hcFacade.GetTeamMemberByTeamId(teamId);

        }


        public List<MatchDTO> GetAllMatchesByTeamId(Guid teamId)
        {
            return hcFacade.GetAllMatchesByTeamId(teamId);

        }

        public List<MatchDTO> GetMatchByMatchId(Guid matchId)
        {
            return hcFacade.GetMatchByMatchId(matchId);

        }


        public List<TeamDTO> GetTeamByGameTypeByYearByAgeGruop(string gameType, int year, string ageDivision)
        {
            return hcFacade.GetTeamByGameTypeByYearByAgeGruop(gameType, year, ageDivision);

        }

        public List<MatchDTO> GetAllMatches()
        {
            return hcFacade.GetAllMatches();

        }

        public List<TeamMemberDTO> GetAllTeamParticipationOfTeamMemberByTeamMemberId(Guid teamMemberId)
        {
            return hcFacade.GetAllTeamParticipationOfTeamMemberByTeamMemberId(teamMemberId);

        }
    }
}
